/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  height: 100%;
  font-family: Arial, sans-serif;
  overflow: hidden;
}

.page-container {
  display: flex;
  flex-direction: column;
  height: 100vh;

  header.banner {
    background-color: #004080;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
    user-select: none;

    select {
      background-color: #004080;
      color: white;
    }
  }


  main.content {
    flex: 1;
    display: flex;
    background-color: #f5f5f5;
    overflow: hidden;

    .nav-icon-link {
      transition: background-color 0.2s, color 0.2s, transform 0.2s;
      border-radius: 0.375rem; /* rounded */
    }

    .nav-icon-link:hover {
      background-color: #e9ecef; /* light gray */
      color: #0d6efd; /* Bootstrap primary */
      transform: scale(1.1);
      cursor: pointer;
    }

    .nav-icon-link.active {
      background-color: #dee2e6;
      color: #0d6efd;
    }

    nav.menu {
      width: 15rem;
      color: white;
      padding: 1rem 0;
      overflow-y: auto;
      user-select: none;
      position: relative;

      ul {
        list-style: none;

        li {
          margin-bottom: 0;
          cursor: pointer;
          padding: 0.5rem 1.5rem;
          border-radius: 0 20px 20px 0;
          transition: background-color 0.3s;
          display: flex;
          align-items: center;
          position: relative;
          white-space: nowrap;
          user-select: none;

          .nav-link {
            width: 100%;
            height: 100%;
          }

          &:hover, &.active {
            background-color: #c5c5c5;
          }

          & > svg.icon {
            width: 20px;
            height: 20px;
            fill: white;
            margin-right: 12px;
            flex-shrink: 0;
          }

          &.has-submenu {
            &[aria-haspopup="true"] {
              & > svg.arrow {
                margin-left: auto;
                width: 12px;
                height: 12px;
                fill: white;
                transition: transform 0.3s ease;
                flex-shrink: 0;
              }
            }

            &.open > svg.arrow {
              transform: rotate(90deg);
            }

            ul.submenu {
              display: none;
              position: absolute;
              top: 0;
              left: 100%;
              background-color: #003366;
              min-width: 180px;
              border-radius: 0 8px 8px 0;
              box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
              z-index: 1000;
              padding: 0.5rem 0;

              li {
                padding: 0.4rem 1.2rem;
                border-radius: 0 15px 15px 0;
                display: flex;
                align-items: center;
                white-space: nowrap;

                &:hover {
                  background-color: #0055aa;
                }

                & > svg.icon {
                  width: 16px;
                  height: 16px;
                  margin-right: 10px;
                  fill: white;
                  flex-shrink: 0;
                }
              }
            }

            &:hover > ul.submenu,
            &.open > ul.submenu {
              display: block;
            }
          }
        }
      }
    }

    .resizer {
      width: 5px;
      cursor: ew-resize;
      background-color: transparent;
      transition: background-color 0.2s;
      user-select: none;

      &:hover,
      &.resizing {
        background-color: rgba(0, 64, 128, 0.3);
        width: 20px;
      }
    }

    section.workspace {
      flex: 1;
      background-color: white;
      overflow: hidden;

      #desktop {
        width: 100%;
        height: 100%;
      }
    }
  }

  footer.footer {
    background-color: #222;
    color: #ccc;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    flex-shrink: 0;
    user-select: none;
  }
}
